package com.wuhunyu.service;

import com.wuhunyu.commonutils.result.CommonResult;
import com.wuhunyu.entities.EduComment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wuhunyu.query.EduCommentQuery;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 评论 服务类
 * </p>
 *
 * @author wuhunyu
 * @since 2021-01-25
 */
public interface EduCommentService extends IService<EduComment> {

    /**
     * 根据课程id和讲师id查询评论
     * @param eduCommentQuery
     * @return
     */
    public CommonResult selectAllComments(EduCommentQuery eduCommentQuery);

    /**
     * 根据用户查询评论
     * @param memberId
     * @return
     */
    public CommonResult selectCommentByMemberId(String memberId);

    /**
     * 添加一条评论
     * @param eduComment
     * @param request
     * @return
     */
    public CommonResult addComment(EduComment eduComment, HttpServletRequest request);

    /**
     * 修改评论
     * @param eduComment
     * @return
     */
    public CommonResult updateComment(EduComment eduComment);

    /**
     * 根据id删除一条评论
     * @param id
     * @return
     */
    public CommonResult deleteCommentById(String id);

    /**
     * 根据用户id删除评论
     * @param memberId
     * @return
     */
    public CommonResult deleteCommentByMemberId(String memberId);

}
